package com.example.equipment.bean.enums;

public enum ResultEnum {
    SUCCESS("0000", "成功"),
    FAIL("0001", "失败"),
    REQUESTPARAMERROR("0002", "请求参数非法"),
    DATABASEERROR("0003", "数据库错误"),
    RESPONSETIMEOUT("0004", "响应超时"),
    DATA_ALREADY_EXISTS("0005", "数据已经存在"),
    SYSTEMEXCEPTION("8888", "系统异常"),

    //file upload
    EXCEL_FILE_READ_EXCEPTION("0100", "读取文件异常"),
    FILE_TYPE_EXCEPTION("0101", "不支持的文件格式"),
    EXCEL_FILE_RESOLVE_EXCEPTION("0102", "文件解析异常"),

    //log
    SESSION_TIMEOUT("0200", "未登录或回话超时"),
    LOGIN_FAILED("0201", "登录失败，请确认账号密码是否正确");

    ResultEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private String code;
    private String msg;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
